package au.edu.unsw.infs3634.gamifiedlearning.model;

import org.litepal.crud.LitePalSupport;

public class Score extends LitePalSupport implements Comparable<Score> {
    private int id;
    private int questionId;
    private int userId;
    private String name;
    private int score;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getQuestionId() {
        return questionId;
    }

    public void setQuestionId(int questionId) {
        this.questionId = questionId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    @Override
    public int compareTo(Score o) {
        return  o.getScore() - this.score;
    }

}
